package edu.hawaii.duedates.userlibraryinfo;

import java.util.List;
import edu.hawaii.duedates.book.Book;
import edu.hawaii.duedates.library.LibraryType;
import edu.hawaii.duedates.user.User;

/**
 * This interface is implemented by all user library info collections. It defines accessor, 
 * mutator, request, validity, and toString behaviors.
 * 
 * @author Ronn Reeves and Robin E. Raqueno
 */
public interface IUserLibraryInfo {

  /**
   * Add a user library pair to the UserLibraryInfo collection.
   * 
   * @param user  The user for whom the info is being requested.
   * @param library  The library from which the info is being to requested.
   */
  public void add(User user, LibraryType library);


  /**
   * Creates a report of the checked out items information for each user and library.
   * 
   * @param sortOption The sort option (by library or due date).
   * @param withinDays The number of days until being due for the books to be displayed.
   * 
   * @return This report.
   */
  public String createReport(String sortOption, int withinDays);

  
  /**
   * Returns the collection of books for this user library info request.
   *
   * @return List&lt;Book&gt;  The collection of books.
   */
  public List<Book> getBooks();
  
  
  /**
   * Returns this collection of library objects.
   *
   * @return List&lt;LibraryType&gt;  The library collection.
   */
  public List<LibraryType> getLibraries();
  
  
  /**
   * Returns the current report.
   * 
   * @return String The current report.
   */
  public String getReport();

  
  /**
   * Returns this collection of user objects.
   *
   * @return List&lt;User&gt;  The user collection.
   */
  public List<User> getUsers();
  
  
  /**
   * Returns the validity of this user library colletion pair.  Returns true if the request is 
   * successful; false, otherwise.
   *
   * @return List&lt;Boolean&gt;  The validities of each user library pair.
   */
  public List<Boolean> getValidities();
  
  
  /**
   * Requests the info from this library for this user.
   */
  public void requestInfo();

  
  /**
   * Sets the collection of books for this user library info request.
   * 
   * @param  books  The collection of books.
   */
  public void setBooks(List<Book> books);
  
  
  /**
   * Sets this collection of libraries from which the info is to be requested.
   * 
   * @param  libraries  The library collection.
   */
  public void setLibraries(List<LibraryType> libraries);
  
  
  /**
   * Sets this collection of users for which the info is to be requested.
   * 
   * @param  users  The user collection.
   */
  public void setUsers(List<User> users);
  
  
  /**
   * Sets the validity of this user library collection objects.
   * 
   * @param  validities  The validity status of each user library collection pair.
   */
  public void setValidities(List<Boolean> validities);
  
  
  /**
   * Returns the library name and user id of this User Library Info request.
   * 
   * @return String  The library name and user id.
   */
  public String toString();
}